<template>
<!-- 分页 -->
  <div class='wrap'>
     <el-pagination
      background
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="page"
      :page-size="pageSize"
      layout="prev, pager, next,total, jumper"
      :total="total">
      <!-- <template slot="singlePageCount">
        每页10条
      </template> -->
    </el-pagination>
  </div>
</template>

<script>
  export default {
    props:{
      page:{
        default(){
          return 1
        },
        type:Number
      },
      pageSize:{
        type:Number,
        default(){
          return 20
        }
      },
      total:{
        type:Number,
        default(){
          return 0
        }
      }
    },
    methods: {
      handleSizeChange(val) {
        // console.log(`每页 ${val} 条`);
        this.$emit("handleSizeChange",val);
      },
      handleCurrentChange(val) {
        this.$emit("handleCurrentChange",val);
        // console.log(`当前页: ${val}`);
      }
    },
  }

</script>
<style lang="less" scoped>
  .wrap{float:right;height: 60px;box-sizing: border-box;padding-top:15px;}
  /deep/.el-pagination.is-background .el-pager li:not(.disabled).active{
    background-color: #666EE8;
  }
  /deep/.el-pagination.is-background .el-pager li{
    border:1px solid #5C5C5C;
    line-height: 28px !important;
    min-width: 28px !important;height: 28px !important;
    border-radius: 50%;
  }
  /deep/.el-pagination.is-background .btn-next,/deep/.el-pagination.is-background .btn-prev{
    // box-sizing:border-box;
    border:1px solid #5C5C5C;
    border-radius: 50%;
    min-width: 28px;height: 28px;
  }
  /deep/.el-pagination__editor.el-input .el-input__inner{
    width: 28px;height: 28px;border-radius: 50%;  border:1px solid #5C5C5C;
  }
  // /deep/.el-pagination__total{
  //   height: 25px !important;
  //   line-height: 25px !important;
  // }
  // /deep/.el-pagination__jump{
  //   height: 25px !important;
  //   margin-left: 5px;
  // }
</style>